//
//  ZBRichCell.m
//  BeidianAPP
//
//  Created by xzb on 2018/08/17.
//

#import "ZBRichCell.h"

NSString *const ZBRichCellIdentifier = @"ZBRichCell";

@implementation ZBRichCellModel

- (NSString *)identify
{
    return ZBRichCellIdentifier;
}

@end

@implementation ZBRichCell

#pragma mark - life cycle

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self addSubView];
        [self addLayout];
    }
    return self;
}

#pragma mark - BDCellInfoProtocol

- (void)loadData:(id)data
{
    if (![data isKindOfClass:[ZBRichCellModel class]]) {
        return;
    }
    self.cellModel = data;
    self.textLabel.text =  self.cellModel.text;
}

+ (CGFloat)cellHeight:(id)model
{
    if (![model isKindOfClass:[ZBRichCellModel class]]) {
        return 0;
    }
    return 44;
}

#pragma mark - event Response

#pragma mark - private methods

- (void)addSubView
{
}

- (void)addLayout
{
}

#pragma mark - getter And setter

@end
